package Demo2;

import java.util.Arrays;

public class TestStudent {
    public static void main(String[] args) {
        //创建数组，存储的是Student类型
        Student[] students = new Student[4];
        students[0] = new Student("Zhangsan","男",23);
        students[1] = new Student("Lisi","女",14);
        students[2] = new Student("Wangwu","男",33);
        students[3] = new Student("Zhaoliu","女",9);

        System.out.println(Arrays.toString(students));
        Arrays.sort(students);
        System.out.println(Arrays.toString(students));

    }
}
